// pages/detail/detail.js
import profile from '../../profile.js'

const app = getApp()

Page({

  /**
   * 页面的初始数据
   */
  data: {
    lang: app.globalData.language,
    index: profile.index,

    id: 0,
    scrollTop: '',

    contentList: [{
      type: 'text',
      content: '大华银行的历史可以追溯到1935年，来自砂拉越的企业家拿督黄庆昌在新加坡创立了大华银行，最初在蒙咸街的一间办公室营业。',
      content_en: 'The history of UOB Bank can be traced back to 1935, when Datuk Wong King Cheong, an entrepreneur from Sarawak, founded Dahua Bank in Singapore, initially operating from an office on Bonham Street.'
    },{
      type: 'text',
      content: '在拿督黄庆昌和六位福建商人的领导下，大华银行致力于为支持本地华商和华人社区。他的创业精神、远见与白手起家的故事不仅塑造了大华银行的早期成功，还确立了大华银行的价值观!诚信、进取、齐心和担当。',
      content_en: 'Under the leadership of Datuk Huang Qingchang and six Fujian businessmen, Dahua Bank is committed to supporting local Chinese merchants and communities. His entrepreneurial spirit, foresight, and self-made story not only shaped the early success of Dahua Bank, but also established its values! Integrity, enterprising, united and responsible.'
    },{
      type: 'image',
      content: '../../images/demo_detail_img1.jpg',
    },{
      type: 'text',
      content: '大华银行创办人拿督黄庆昌',
      content_en: 'Datuk Wong Hing cheong, founder of UOB Bank',
      textStyle: 'image-title'
    },{
      type: 'image',
      content: '../../images/demo_detail_img2.jpg',
    },{
      type: 'text',
      content: '大华银行原始股凭证(1935年)',
      content_en: 'Original Stock Certificate of Dahua Bank (1935)',
      textStyle: 'image-title'
    },{
      type: 'image',
      content: '../../images/demo_detail_img3.jpg',
    },{
      type: 'text',
      content: '1937年，拿督黄庆昌(前排中间)与大华银行董事和员工在他位于丹戎禺的家中合影',
      content_en: 'In 1937, Datuk Huang Qingchang (middle of the front row) took a photo with the directors and employees of UOB Bank at his home in Tanjung Yuu',
      textStyle: 'image-title'
    },{
      type: 'text',
      content: '在拿督黄庆昌和六位福建商人的领导下，大华银行致力于为支持本地华商和华人社区。他的创业精神、远见与白手起家的故事不仅塑造了大华银行的早期成功,还确立了大华银行的价值观:诚信、进取、齐心和担当。',
      content_en: 'Under the leadership of Datuk Huang Qingchang and six Fujian businessmen, UOB Bank is committed to supporting local Chinese merchants and communities. His entrepreneurial spirit, foresight, and self-made story not only shaped the early success of Dahua Bank, but also established its values of integrity, enterprising, unity, and responsibility.'
    }]
  },

  backTopTap(e) {
    this.setData({
      scrollTop: '0'
    })
  },

  backTap(e) {
    wx.navigateBack({
      delta: 1
    });
  },

  homeTap(e) {
    wx.navigateTo({
      url: '../index/index',
    })
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    let id, arr = profile.index.indexLinks;
    if (options.id == undefined){
      id = this.data.id;
    }else{
      id = options.id;
    }
    this.setData({
      id: options.id,
    })
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  }
})